package com.rimi.lzhg.entry;

import lombok.*;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class Menu implements Serializable {

    private Integer id;

    private Integer typeId;

    private String name;

    private Integer monthlySale;

    private String imgUrl;

    private String desc;

    private Integer praiseNumber;

    private Date upTime;

    private Integer isHot;

    private Integer isDisable;

    private Integer orderNum;

    //订单中菜品的数量
    private Integer lunchNumber;

    private Integer dinnerNumber;

    private List<Comment> comments;

    private Double rating;

    public Long getRating() {
        if(this.rating!=null){
            return Math.round(rating);
        }
        return 0L;
    }

    private static final long serialVersionUID = 1L;

}